package cn.liujinnan.tetris.exception;/*
 *
 * Copyright(c) 2021 by liujinnan.cn All rights Reserved.
 */

import cn.liujinnan.tetris.constant.ExceptionEnum;

/**
 * @author LiuJinan
 * @date 2021-08-22 00:18
 */
public class TetrisException extends RuntimeException{

    private final String code;
    private final String message;

    public TetrisException(ExceptionEnum exceptionEnum) {
        this.code = exceptionEnum.getCode();
        this.message = exceptionEnum.getMessage();
    }

    public TetrisException(ExceptionEnum exceptionEnum, String message) {
        this.code = exceptionEnum.getCode();
        this.message = message;
    }
}
